EOF Function

Syntax

End_Of_File_Flag as L = EOF([C tablename])

Arguments

End_Of_File_Flag

.T. (TRUE) if the record pointer is at the end of the file for the specified table; otherwise, .F. (FALSE).

tablename

Optional. Default = the table associated with the current layout. The name of a table.

Description

Returns TRUE if the record pointer is at the end of the file.

Discussion

You may use the EOF() function in a layout. The function returns .T. (TRUE) if the record pointer is at the end of the file for the specified table; otherwise, it returns .F. (FALSE). Note : The <TBL>.FETCH_EOF()method is the easiest way to test for the end of a file.

Example

dim tbl as P
dim i as N
dim cnt as N
tbl = table.open("Product")
cnt = tbl.records_get()
tbl.fetch_first()
i = 1
statusbar.Percent(i, cnt)
while .not. eof("Product")
    tbl.fetch_next()
    i = i + 1
    statusbar.percent(i,cnt)
wend
tbl.close()

See Also